package leetCode.hw.string;

public class HJ4Solution implements HJ4 {


    @Override
    public String hexToInteger(String hex) {
        if(hex.contains("x")) hex = hex.substring(2);
        Integer a = Integer.parseInt(hex,16);
        return a+"";
    }

    public static void main(String[] args) {
        System.out.println(new HJ4Solution().hexToInteger("0xAA"));
    }

}
